package com.example.juc.threadPool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ExecutorTest {

    public  static ExecutorService executorService = Executors.newFixedThreadPool(5);

    public static void main(String[] args) {
            testTryCatch();
    }

    public static void testTryCatch(){
        executorService.execute(() -> {
            try {
                int i = 10 / 0;
            }catch (Exception e){
                System.out.println("出现异常"+e.getMessage());
            }
        });
    }

}
